package demo1;

public class Animal {
    public int age;
    public String name;

    public Animal(int age, String name) {
        this.age = age;
        this.name = name;
    }
    public void sleep(){
        System.out.println(this.name + "在睡觉");
    }

    public Animal eat(){
        System.out.println(this.name + "在吃饭");
        return null;
    }
}
